const express = require('express');
const path = require('path');
const app = express();
const port = 4001;

// 配置静态文件服务中间件
// app.use(function (req, res, next) {
//   // res.setHeader('Access-Control-Allow-Origin', `*`);
//   if (req.query.name) {
//     console.log('----------', req.query.name);
//   }
//   next();
// });
app.use(express.static(path.resolve(__dirname, `./svg`)));
app.use('/test', express.static(`D:\\wk\\gitee\\vue-test\\dist`));

app.listen(port, function () {
  console.info(`server started in http://localhost:${port}`);
});
